/*
 * Copyright (c) 2007-2020 西安交通信息投资营运有限公司 版权所有
 */

package com.xci.edu.core.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.github.lvyanyang.core.BaseEntity;
import com.github.lvyanyang.core.Const;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 课程明细
 * @author 焦元义 jiaoyuanyi@xci96716.com
 * @since 2020-11-24 15:14:37
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "课程明细")
public class EduCoursewareDetails extends BaseEntity {
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ExcelIgnore
    @Excel(name = "主键", width = 20d)
    @ApiModelProperty(value = "主键", position = 1)
    private Long id;

    /**
     * 课程主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "课程主键不能为空")
    @Excel(name = "课程主键", width = 20d)
    @ApiModelProperty(value = "课程主键", required = true, position = 2)
    private Long coursewareId;

    /**
     * 课件名称
     */
    @NotBlank(message = "课件名称不能为空")
    @Length(max = 50, message = "课件名称长度不能超过{max}个字符")
    @Excel(name = "课件名称", width = 20d)
    @ApiModelProperty(value = "课件名称", required = true, position = 3)
    private String name;

    /**
     * 课件地址
     */
    @NotBlank(message = "课件地址不能为空")
    @Length(max = 500, message = "课件地址长度不能超过{max}个字符")
    @Excel(name = "课件地址", width = 20d)
    @ApiModelProperty(value = "课件地址", required = true, position = 4)
    private String url;

    /**
     * 排序号
     */
    @NotNull(message = "排序号不能为空")
    @Excel(name = "排序号", width = 20d)
    @ApiModelProperty(value = "排序号", required = true, position = 5)
    private Integer path;

}